<template>
  <div>
    新地址：<el-input type="text" v-model="address"/>
    <el-button type="primary" plain @click="send">提交</el-button>
  </div>
</template>

<script>
  export default {
    name: "OrderUpdate",
    data(){
      return{
        address:'',
        page:{}
      }
    },
    methods:{
      send(){
          this.$axios.post('OrderServlet/updateAddr?addr='+this.address + '&o_id=' +this.page.list[0].order.o_id);
        this.$router.push('/order/unSend')
      }
    },
    created() {
      this.$axios.get('/OrderServlet/listByO_Id?o_id='+this.$route.params.id)
        .then(resp=>{
          this.page = resp.data;
          this.address = this.page.list[0].order.o_address;
        })
    }
  }
</script>

<style scoped>

</style>
